<?php
/**
 * Created by PhpStorm.
 * User: Chris
 * Date: 14-7-26
 * Time: 下午2:48
 */
function isWeixinBrowser(){
    $userAgent = Input::user_agent();
    return strstr($userAgent, "MicroMessenger");
}

function formatDateTime($timestamp, $format="%Y/%m/%d %H:%M"){
//    Date::display_timezone('Asia/Shanghai');
//    $timezone = new DateTimeZone('Asia/Shanghai');
    $timezone = 'Asia/Shanghai';
    $date = Date::forge($timestamp, $timezone);
//    $date = Date::forge($timestamp);
//    print_r($date);exit;
//    var_dump($date);echo $date->format("%Y/%m/%d");exit;
    return $date->format($format);
//    return $date->format("%Y/%m/%d");
}

?>
